package com.yjq.programmer.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yjq.programmer.annotation.ValidateEntity;

import java.util.Date;

/**
 * @author 杨杨吖
 * @QQ 823208782
 * @WX yjqi12345678
 * @create 2022-11-13 17:31
 */
public class AlbumDTO {

    private String id;

    @ValidateEntity(required=true,requiredMaxLength=true,requiredMinLength=true,maxLength=32,minLength=1,errorRequiredMsg="专辑名称不能为空！",errorMaxLengthMsg="专辑名称长度不能大于32！",errorMinLengthMsg="专辑名称不能为空！")
    private String name;

    private String singerName;

    @ValidateEntity(required=true,errorRequiredMsg="专辑所属歌手不能为空！")
    private String singerId;

    @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
    private Date createTime;

    private String coverPhoto;

    @ValidateEntity(required=true,errorRequiredMsg="专辑所属分类不能为空！")
    private String albumCategoryId;

    private AlbumCategoryDTO albumCategoryDTO;

    private Integer viewNum;

    private String singerPhoto;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSingerName() {
        return singerName;
    }

    public void setSingerName(String singerName) {
        this.singerName = singerName;
    }

    public String getSingerId() {
        return singerId;
    }

    public void setSingerId(String singerId) {
        this.singerId = singerId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCoverPhoto() {
        return coverPhoto;
    }

    public void setCoverPhoto(String coverPhoto) {
        this.coverPhoto = coverPhoto;
    }

    public String getAlbumCategoryId() {
        return albumCategoryId;
    }

    public void setAlbumCategoryId(String albumCategoryId) {
        this.albumCategoryId = albumCategoryId;
    }

    public Integer getViewNum() {
        return viewNum;
    }

    public void setViewNum(Integer viewNum) {
        this.viewNum = viewNum;
    }

    public AlbumCategoryDTO getAlbumCategoryDTO() {
        return albumCategoryDTO;
    }

    public void setAlbumCategoryDTO(AlbumCategoryDTO albumCategoryDTO) {
        this.albumCategoryDTO = albumCategoryDTO;
    }

    public String getSingerPhoto() {
        return singerPhoto;
    }

    public void setSingerPhoto(String singerPhoto) {
        this.singerPhoto = singerPhoto;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", singerName=").append(singerName);
        sb.append(", singerId=").append(singerId);
        sb.append(", createTime=").append(createTime);
        sb.append(", coverPhoto=").append(coverPhoto);
        sb.append(", albumCategoryId=").append(albumCategoryId);
        sb.append(", viewNum=").append(viewNum);
        sb.append(", albumCategoryDTO=").append(albumCategoryDTO);
        sb.append(", singerPhoto=").append(singerPhoto);
        sb.append("]");
        return sb.toString();
    }
}
